package day03.homework;

public class OperDemo1 {
    public static void main(String[] args) {
        System.out.println(3%6);//3
        System.out.println(5%4);//1
        System.out.println(8%2);//0

        int a=8,b=9;
        a++;
        ++b;
        System.out.println("a="+a);//9
        System.out.println("b="+b);//10
        a--;
        --b;
        System.out.println("a="+a);//8
        System.out.println("b="+b);//9

        int c = a++ + --b;//8+8=16
        System.out.println("a="+a+",b="+b+",c="+c);//9 8 16
        int d = ++a + b--;//10+8=18
        System.out.println("a="+a+",b="+b+",d="+d);//10 7 18


    }
}
